<?php

// Si le fichier de qui d�finie les constantes n'a pas encore �t� appel� on le charge
if (!defined('CONFIGURATION_FILE_LOADED'))
    include( 'includes/configuration_include.php');

include( PATH_MODELS . 'archives_model.php');
include( PATH_VIEWS . 'archives_view.php');

$bdd = model_db_connexion();

$req = model_archives($bdd);
echo '<div id="volet"class="volet" ><span id="archive_title">--- ARCHIVES ---</span>';
echo '<div id="widthbox"><div id="infinitebox">';
while ($donnees = $req->fetch(PDO::FETCH_ASSOC)) {
    $id_playlist = $donnees['id_playlist'];
    $name = $donnees['playlist_name'];
    $author = $donnees['playlist_author'];
    $genre1 = $donnees['playlist_genre_1'];
    $genre2 = $donnees['playlist_genre_2'];
    $genre3 = $donnees['playlist_genre_3'];
    $ambiance = $donnees['playlist_ambiance'];
    $date = $donnees['playlist_date'];
    $type_img = $donnees['playlist_img_type'];
    
    
    $str = print_archives($id_playlist, $name, $author, $genre1, $genre2, $genre3, $ambiance, $type_img, $date);
    echo $str;
    
    
}
echo '</div></div></div>';

?>